//
//  BGDateResult.m
//  bigMall
//
//  Created by LTOVE on 16/7/13.
//  Copyright © 2016年 thinklev. All rights reserved.
//

#import "result.h"
#import "BGMyTenderModel.h"
#import "BGCheckReportModel.h"
#import "BGBasicresModel.h"
@interface BGDateResult ()
@property (nonatomic,copy)NSString *url;
@property (nonatomic,strong) BGParam *param;
@end



@implementation BGDateResult

-(BGParam *)param
{
    if (_param == nil) {
        _param = [[BGParam alloc]init];
    }
    return _param;
}

-(NSString *)url
{
    if (_url == nil) {
        _url = [BGBasicUrl getUrl];
    }
    
    return _url;
    
}

- (BGParam *)GetBGParam
{
    BGParam *param = [[BGParam alloc]init];
    return param;
}

#pragma 一下是API接口实现
+ (void)getPhoneCodeWithPhoneNum:(NSString *)phoneNum andPicCode:(NSString *)code andType:(NSString *)type success:(void (^)(NSDictionary *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic = @{@"phone": phoneNum,@"code":code,@"type":type,@"id":@"1"};
    BGParam *param = [BGParam getParamWithaction:@"sendSmsCode" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGBGPhoneCodeResult *result = [BGBGPhoneCodeResult objectWithKeyValues:responseObject];
        if (success) {
            success(result.keyValues);
        }
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)getPhoneCodeWithPhoneNim:(NSString *)phoneNum andType:(NSString *)type success:(void (^)(NSDictionary *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic = @{@"phone": phoneNum,@"type":type,@"id":@"1"};
    BGParam *param = [BGParam getParamWithaction:@"sendSmsCodeNoPic" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGBGPhoneCodeResult *result = [BGBGPhoneCodeResult objectWithKeyValues:responseObject];
        if (success) {
            success(result.keyValues);
        }
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)logininWithUserName:(NSString *)userName andPwd:(NSString *)pwd success:(void (^)(NSObject *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"pwd":pwd,@"nameOrPhone":userName};
    BGParam *param = [BGParam getParamWithaction:@"login" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGBGLoginResult *result = [BGBGLoginResult objectWithKeyValues:responseObject];
//        NSArray *resultArr = @[result.res];
        GWLog(@"%@",result.keyValues);
        if (success) {
            success((NSObject *)result.res,result.status,result.msg);
        }
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
    
}

+ (void)registerWithUserName:(NSString *)userName phone:(NSString *)phone pwd:(NSString *)pwd apwd:(NSString *)apwd phoneCode:(NSString *)code success:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"userName":userName,
                         @"phone":phone,
                         @"agapwd":apwd,
                         @"type":@"bigmallRegister",
                         @"phoneCode":code,
                         @"pwd":pwd,
                         @"id":@"1"};
    BGParam *param = [BGParam getParamWithaction:@"userRegister" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGRegistRequest *result = [BGRegistRequest objectWithKeyValues:responseObject];
        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result.status,result.msg,dic[@"autoRes"]);
        }
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)loginOutSuccess:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{};
    BGParam *param = [BGParam getParamWithaction:@"logout" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGBasicResult *result = [BGBasicResult objectWithKeyValues:responseObject];
        if (success) {
            success(result.status,result.msg,nil);
        }
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];

}

+ (void)getUserInfoSuccess:(void (^)(NSString *, NSString *, NSDictionary *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{};
    BGParam *param = [BGParam getParamWithaction:@"userInfo" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
//        BGUserInfoResult *result = [BGUserInfoResult objectWithKeyValues:responseObject];
        
        NSDictionary * dic1 = [NSJSONSerialization JSONObjectWithData:responseObject options:NSJSONReadingMutableContainers error:nil];
        
        if (success) {
            success(dic1[@"status"],dic1[@"msg"],(NSDictionary *)dic1[@"res"]);
        }
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)forgetLoginPwdWithPhone:(NSString *)phone andPwd:(NSString *)pwd andAgapwd:(NSString *)agapwd andType:(NSString *)type andPhoneCode:(NSString *)phoneCode  success:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"phone":phone,
                         @"pwd":pwd,
                         @"agapwd":agapwd,
                         @"type":@"forgetLoginPwd",
                         @"phoneCode":phoneCode,
                         @"id":@"1"};
    BGParam *param = [BGParam getParamWithaction:@"forgetLoginPwd" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGforgetLoginPwdWithPhoneResult *result = [BGforgetLoginPwdWithPhoneResult objectWithKeyValues:responseObject];
        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result.status,result.msg,dic[@"autoRes"]);
        }

    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];

}

+ (void)forgetPayPwdWithPhone:(NSString *)phone andPwd:(NSString *)pwd andAgapwd:(NSString *)agapwd andType:(NSString *)type andPhoneCode:(NSString *)phoneCode success:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"phone":phone,
                         @"payPwd":pwd,
                         @"agapwd":agapwd,
                         @"type":@"forgetPayPwd",
                         @"id":@"1",
                         @"phoneCode":phoneCode};
    BGParam *param = [BGParam getParamWithaction:@"forgetPayPwd" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGforgetPayPwdWithPhoneResult *result = [BGforgetPayPwdWithPhoneResult objectWithKeyValues:responseObject];
        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result.status,result.msg,dic[@"autoRes"]);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
    
}

+ (void)updateLoginPwdWithOldPwd:(NSString *)oldPwd andPwd:(NSString *)pwd andAgaPwd:(NSString *)agapwd success:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"oldPwd":oldPwd,
                         @"pwd":pwd,
                         @"agapwd":agapwd,
                         };
    BGParam *param = [BGParam getParamWithaction:@"updateLoginPwd" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGupdateLoginPwdWithOldPwdresult *result = [BGupdateLoginPwdWithOldPwdresult objectWithKeyValues:responseObject];
        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result.status,result.msg,dic[@"autoRes"]);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)updatePayPwdWithOldPayPwd:(NSString *)oldPayPwd andPwd:(NSString *)pwd andAgaPayPwd:(NSString *)agaPaypwd success:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"oldPayPwd":oldPayPwd,
                         @"payPwd":pwd,
                         @"agapwd":agaPaypwd,
                         };
    BGParam *param = [BGParam getParamWithaction:@"updatePayPwd" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGupdatePayPwdWithOldPayPwdResult *result = [BGupdatePayPwdWithOldPayPwdResult objectWithKeyValues:responseObject];
        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result.status,result.msg,dic[@"autoRes"]);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)upDatePhoneWithPhone:(NSString *)phoneNum andPayPwd:(NSString *)payPwd andPhoneCode:(NSString *)phoneCode success:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"phone":phoneNum,
                         @"payPwd":payPwd,
                         @"phoneCode":phoneCode,
                         @"type":@"updatePhone",
                         };
    BGParam *param = [BGParam getParamWithaction:@"updatePhone" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGupDatePhoneWithPhoneResult *result = [BGupDatePhoneWithPhoneResult objectWithKeyValues:responseObject];
        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result.status,result.msg,dic[@"autoRes"]);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)checkPicCodeWithCode:(NSString *)code andType:(NSString *)type success:(void (^)(NSString *, NSString *, NSString *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{@"code":code,
                         @"type":type,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"checkCode" dictionary:dic];
    NSLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGCheckCollect *result = [BGCheckCollect objectWithKeyValues:responseObject];
//        result.status = @"1";
//        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result.status,result.msg,@"");
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)loadShopHomeDataWithCatId:(NSString *)catId province:(NSString *)province order:(NSString *)order thisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"catId":catId,
                         @"province":province,
                         @"order":order,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
//                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"goodsList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGShopDataModel *result = [BGShopDataModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)loadFenLeiWithLevel:(NSString *)level key:(NSString *)key success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"level":level,
                         @"key":key,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"goodsCategory" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGFenLeiModel *result = [BGFenLeiModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)loadAreaWithStructure:(NSString *)structure success:(void (^)(NSObject *result))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"structure":structure,
//                         @"key":key,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"areaList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAreaResultModel *result = [BGAreaResultModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)loadGoodInfoWithGoodsId:(NSString *)goodsId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"goodsId":goodsId,
                         //                         @"key":key,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"goodsDetail" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGBasicresModel *result = [BGBasicresModel objectWithKeyValues:responseObject];
        
//                NSDictionary *dic = result.keyValues;
//        [dic writeToFile:@"/Users/LTOVE/Desktop/da.plist" atomically:YES];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)calculateMarginWithRole:(NSString *)role type :(NSString *)type money:(NSString *)money objId:(NSString *)objId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    if (!money) {
        money = @"";
    }
    NSDictionary *dic =@{
                          @"role":role,
                          @"type":type,
                          @"money":money,
                          @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"calculateMargin" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGCalculateMarginModel *result = [BGCalculateMarginModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)CalculateCreditWithRole:(NSString *)role type:(NSString *)type money:(NSString *)money success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    if (!role) {
        role = @"";
    }
    if (!type) {
        type = @"";
    }
    if (!money) {
        money = @"";
    }
    NSDictionary *dic =@{
                         @"role":role,
                         @"type":type,
                         @"money":money,
//                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"calculateCredit" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGCalculateCreditModel *result = [BGCalculateCreditModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)addStepPricesWithStepPrices:(NSArray *)stepPrices success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"stepPrices":stepPrices,
//                         @"type":type,
//                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"addStepPrices" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAddStepPricesModel *result = [BGAddStepPricesModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)getStepPriceWithIds:(NSString *)ids success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"ids":ids,
                         //                         @"type":type,
                         //                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"getStepPrice" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGGetStepPriceResultModel *result = [BGGetStepPriceResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)getAddGoodsParamSuccess:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
//                         @"ids":ids,
                         //                         @"type":type,
                         //                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"getAddGoodsParam" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGGetAddGoodsParamResultModel *result = [BGGetAddGoodsParamResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)addGoodsStepOneWithPrameDic:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
//    NSDictionary *dic =@{
//                         //                         @"ids":ids,
//                         //                         @"type":type,
//                         //                         @"money":money,
//                         //                         @"objId":objId,
//                         
//                         };
    BGParam *param = [BGParam getParamWithaction:@"addGoodsStepOne" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAddGoodsStepOneModel *result = [BGAddGoodsStepOneModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)attrChangePricewithPrameDic:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    BGParam *param = [BGParam getParamWithaction:@"attrChangePrice" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAttrChangePriceResultModel *result = [BGAttrChangePriceResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)addCollectWithType:(NSString *)type objId:(NSString *)objId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"objId":objId,
                         //                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"addCollect" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAddCollectModel *result = [BGAddCollectModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)checkCollectWithType:(NSString *)type objId:(NSString *)objId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"objId":objId,
                         //                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"checkCollect" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGCheckCollect *result = [BGCheckCollect objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)cancelCollectWithId:(NSString *)ids success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSLog(@"%@",ids);
    NSDictionary *dic =@{
//                         @"type":type,
                         @"id":ids,
                         //                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"cancelCollect" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGCheckCollect *result = [BGCheckCollect objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)ownInviteListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"ownInviteList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGMyTendetListResultModel *result = [BGMyTendetListResultModel objectWithKeyValues:responseObject];
     
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownInviteDownWithInviteld:(NSString *)invireld success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"inviteId":invireld,
//                         @"pageNum":pageNum,
                         //                         @"money":money,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"ownInviteDown" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnInviteDownModel *result = [BGOwnInviteDownModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)ownInviteBidLogsWithThisPage:(NSString *)thisPage pageNum:(NSString *)tageNum inviteld:(NSString *)inviteld success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                          @"thisPage":thisPage,
                          @"pageNum":tageNum,
                          @"inviteId":inviteld,
                         //                         @"objId":objId,
                         
                         };
    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownInviteBidLogs" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnInviteBidLogsResultModel *result = [BGOwnInviteBidLogsResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)categoryAttrWithCatId:(NSString *)catId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"catId":catId,
//                         @"pageNum":tageNum,
//                         @"inviteId":inviteld,
                         //                         @"objId":objId,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"categoryAttr" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGCategoryAttrResultModel *result = [BGCategoryAttrResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)replyBidWithInviteld:(NSString *)inviteld bidId:(NSString *)bidId reply:(NSString *)reply success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    
    NSDictionary *dic =@{
                              @"inviteId":inviteld,
                              @"bidId":bidId,
                              @"reply":reply,
//                              @"objId":objId,
                  
                         };
//    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"replyBid" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGReplyBidModel *result = [BGReplyBidModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)addInviteOneWithParam:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
//    NSDictionary *dic =@{
//                         @"inviteId":inviteld,
//                         @"bidId":bidId,
//                         @"reply":reply,
//                         //                              @"objId":objId,
//                         
//                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"addInviteOne" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGAddInviteOneModel *result = [BGAddInviteOneModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+(void)addInviteTwoWithParam:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    BGParam *param = [BGParam getParamWithaction:@"addInviteTwo" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGAddInviteTwoModel *result = [BGAddInviteTwoModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownFundListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pagNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
        NSDictionary *dic =@{
                             @"thisPage":thisPage,
                             @"pageNum":pagNum,
//                             @"reply":reply,
                             //                              @"objId":objId,
    
                             };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownFundList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGBGOwnFundListResultModel *result = [BGBGOwnFundListResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownFundSuccess:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
//                         @"thisPage":thisPage,
//                         @"pageNum":pagNum,
//                         //                             @"reply":reply,
                         //                              @"objId":objId,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownFund" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnFundModel *result = [BGOwnFundModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownCreditListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pagNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                          @"thisPage":thisPage,
                          @"pageNum":pagNum,
                         //                         //                             @"reply":reply,
                         //                              @"objId":objId,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownCreditList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnCreditListResultModel *result = [BGOwnCreditListResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownCreditSuccess:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         //                         @"thisPage":thisPage,
                         //                         @"pageNum":pagNum,
                         //                         //                             @"reply":reply,
                         //                              @"objId":objId,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownCredit" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnCreditModel *result = [BGOwnCreditModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)updateCreditWithType:(NSString *)type objectId:(NSString *)objectId creadit:(NSString *)creatId remark:(NSString *)remark success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"objectId":objectId,
                         @"credit":creatId,
                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"updateCredit" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGUpdateCreditModel *result = [BGUpdateCreditModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)ownCollectListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum type:(NSString *)type success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
//                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownCollectList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGBGOwnCollectListResultModel *result = [BGBGOwnCollectListResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownMessageListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum type:(NSString *)type success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownMessageList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnMessageListResultModel *result = [BGOwnMessageListResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)sendMessageWithTo:(NSString *)to toType:(NSString *)toType title:(NSString *)title cont:(NSString *)cont success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"to":to,
                         @"toType":toType,
                         @"title":title,
                         @"cont":cont,
//                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"sendMessage" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGsendMessageModel *result = [BGsendMessageModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)deleteMessageWithIdStr:(NSString *)idStr success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"id":idStr,
//                         @"toType":toType,
//                         @"title":title,
//                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"deleteMessage" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGsendMessageModel *result = [BGsendMessageModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)owmSadListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum type:(NSString *)typeStr success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":typeStr,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"title":title,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownSadList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnSadListResultModel *result = [BGOwnSadListResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)deleteOwmSadWithIdstr:(NSString *)idstr success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"id":idstr,
                         //                         @"toType":toType,
                         //                         @"title":title,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"deleteOwnSad" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGsendMessageModel *result = [BGsendMessageModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)ownBidLogWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"title":title,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownBidLog" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnBidLogModel *result = [BGOwnBidLogModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)cancelBidWithIdstr:(NSString *)idStr success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"id":idStr,
//                         @"pageNum":pageNum,
                         //                         @"title":title,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"cancelBid" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGCancelBidModel *result = [BGCancelBidModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownGoodsListOrder:(NSString *)order thisPage:(NSString *)thisPagee pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"order":order,
                         @"pageNum":pageNum,
                         @"thisPage":thisPagee,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownGoodsList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnGoodsListModel *result = [BGOwnGoodsListModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownGoodsDetailWithGoodsId:(NSString *)goodsId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"goodsId":goodsId,
//                         @"pageNum":pageNum,
//                         @"thisPage":thisPagee,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownGoodsDetail" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnGoodsDetailModel *result = [BGOwnGoodsDetailModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownGoodsDownWithGoodsId:(NSString *)goodsId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"goodsId":goodsId,
                         //                         @"pageNum":pageNum,
                         //                         @"thisPage":thisPagee,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownGoodsDown" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnGoodsDownModel *result = [BGOwnGoodsDownModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownGoodsDelWithGoodsId:(NSString *)goodsId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"goodsId":goodsId,
                         //                         @"pageNum":pageNum,
                         //                         @"thisPage":thisPagee,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownGoodsDel" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnGoodsDelModel *result = [BGOwnGoodsDelModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)addGoodsStepTwoWithParamDic:(NSDictionary *)paramDic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
//    NSDictionary *dic =@{
////                         @"goodsId":goodsId,
//                         //                         @"pageNum":pageNum,
//                         //                         @"thisPage":thisPagee,
//                         //                         @"cont":cont,
//                         //                         @"remark":remark,
//                         
//                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"addGoodsStepTwo" dictionary:paramDic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGAddGoodsStepTwoModel *result = [BGAddGoodsStepTwoModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)addGoodsStepThreeWithObjectId:(NSString *)objectID checkREport:(NSString *)checkReport success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                          @"objectId":objectID,
                          @"checkReport":checkReport,
                         //                         @"thisPage":thisPagee,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"addGoodsStepThree" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnGoodsDelModel *result = [BGOwnGoodsDelModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
    
}

+ (void)sellerOrderListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum type:(NSString *)type success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"pageNum":pageNum,
                         @"thisPage":thisPage,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"sellerOrderList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGShellerOrderListModel *result = [BGShellerOrderListModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)sellerOrderDetailWithOrderId:(NSString *)orderId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"orderId":orderId,
//                         @"pageNum":pageNum,
//                         @"thisPage":thisPage,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"sellerOrderDetail" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGBasicresModel *reModel = [BGBasicresModel objectWithKeyValues:responseObject];
        BGBuyerOrderDetailResModel *res = [BGBuyerOrderDetailResModel objectWithKeyValues:reModel.res];
        BGBuyerOrderDetailUserInfoModel *userinfo = [BGBuyerOrderDetailUserInfoModel objectWithKeyValues:reModel.res[@"user_info"]];
        BGBuyerOrderDetailGoodsInfo *goodsInfo =[BGBuyerOrderDetailGoodsInfo objectWithKeyValues:reModel.res[@"goods_info"]];
        BGBuyerOrderDetailShopInfo *shopInfo = [BGBuyerOrderDetailShopInfo new];
        shopInfo.name = userinfo.name,
        shopInfo.com_name = userinfo.com_name,
        shopInfo.phone = userinfo.phone;
        res.shop_info = shopInfo;
        res.goods_info = goodsInfo;
        BGBuyerOrderDetailModel *result = [BGBuyerOrderDetailModel new];
        result.status = reModel.status;
        result.msg = reModel.msg;
        result.res = res;
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)buyerOrderListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum type:(NSString *)type success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"pageNum":pageNum,
                         @"thisPage":thisPage,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"buyerOrderList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGShellerOrderListModel *result = [BGShellerOrderListModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)buyerOrderDetailWithOrderId:(NSString *)ordeId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    if (!ordeId) {
        ordeId = @"";
    }
    NSDictionary *dic =@{
                         @"orderId":ordeId,
//                         @"pageNum":pageNum,
//                         @"thisPage":thisPage,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"buyerOrderDetail" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGBasicresModel *result = [BGBasicresModel objectWithKeyValues:responseObject];
        BGBuyerOrderDetailResModel *res = [BGBuyerOrderDetailResModel objectWithKeyValues:result.res];
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)submitAuthInfoWithParamDic:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
//    NSDictionary *dic =@{
//                         @"orderId":ordeId,
//                         //                         @"pageNum":pageNum,
//                         //                         @"thisPage":thisPage,
//                         //                         @"cont":cont,
//                         //                         @"remark":remark,
//                         
//                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"submitAuthInfo" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGSubmitAuthInfoModel *result = [BGSubmitAuthInfoModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+(void)sellerOrderStepWithParamDic:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
//    NSDictionary *dic =@{
//                         @"orderId":orderId,
//                         @"action":action,
//                         //                         @"thisPage":thisPage,
//                         //                         @"cont":cont,
//                         //                         @"remark":remark,
//                         
//                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"sellerOrderStep" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGSellerOrderStepModel *result = [BGSellerOrderStepModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)checkPayPasswordCashCreditWithPayPassWord:(NSString *)passWord cash:(NSString *)cash credit:(NSString *)credit success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"payPassword":passWord,
                         @"cash":cash,
                         @"credit":credit,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"checkPayPasswordCashCredit" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGBasicResult *result = [BGBasicResult objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)buyerOrderStepWithParamDic:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    BGParam *param = [BGParam getParamWithaction:@"buyerOrderStep" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGSellerOrderStepModel *result = [BGSellerOrderStepModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)getImageInfoWithIds:(NSString *)ids success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    
    if (!ids) {
        ids = @"";
    }
    
    NSDictionary *dic =@{
                         @"ids":ids,
//                         @"cash":cash,
//                         @"credit":credit,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"getImageInfo" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGGetImageInfoModel *result = [BGGetImageInfoModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownAppraiseListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                          @"thisPage":thisPage,
                          @"pageNum":pageNum,
                         //                         @"credit":credit,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownAppraiseList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwmAppraiseList *result = [BGOwmAppraiseList objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownAuctionWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"credit":credit,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownAuction" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnAuctionModel *result = [BGOwnAuctionModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)inviteListWithThisPage:(NSString *)thisPage catId:(NSString *)catId provience:(NSString *)provience order:(NSString *)order pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"catId":catId,
                         @"province":provience,
                         @"order":order,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"inviteList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGShopDataModel *result = [BGShopDataModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)loadinviteId:(NSString *)invite success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"inviteId":invite,
                         //                         @"key":key,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"inviteDetail" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
//        BGGoodInfoDataResult *results = [BGGoodInfoDataResult objectWithKeyValues:responseObject];
//        BGGoodInfoResult *itemModel = results.res;
        //                NSDictionary *dic = result.keyValues;
        //        [dic writeToFile:@"/Users/LTOVE/Desktop/da.plist" atomically:YES];
        BGBasicresModel *results = [BGBasicresModel objectWithKeyValues:responseObject];
        BGGoodInfoDataResult *reslutM = [BGGoodInfoDataResult new];
        
        BGGoodInfoResult *itemModel = [BGGoodInfoResult objectWithKeyValues:results.res];
        [BGDateResult getImageInfoWithIds:itemModel.check_report success:^(NSObject *result) {
            BGGetImageInfoModel *imageModels = (BGGetImageInfoModel *)result;
            
            NSMutableArray *array = [NSMutableArray array];
            for (BGGetImageInfoModelRes *modelss in imageModels.res) {
                BGCheckReportModel *MyImageModel = [BGCheckReportModel new];
                MyImageModel.url = modelss.url;
                [array addObject:MyImageModel];
                
            }
            
            itemModel.check_reports = array;
            reslutM.res = itemModel;
            if (success) {
                success((NSObject *)reslutM.res);
            }
        } failure:^(NSError *error) {
            
            
        }];
        
        
        
        
        
        
        
        
        
        
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)auctionListWithCatId:(NSString *)catId province:(NSString *)province order:(NSString *)order thisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"catId":catId,
                         @"province":province,
                         @"order":order,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"auctionList" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGShopDataModel *result = [BGShopDataModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)auctionDetailWithAuctionId:(NSString *)invite success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"auctionId":invite,
                         //                         @"key":key,
                         
                         };
    BGParam *param = [BGParam getParamWithaction:@"auctionDetail" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGBasicresModel *results = [BGBasicresModel objectWithKeyValues:responseObject];
        BGGoodInfoDataResult *reslutM = [BGGoodInfoDataResult new];
        
        BGGoodInfoResult *itemModel = [BGGoodInfoResult objectWithKeyValues:results.res];
        reslutM.res = itemModel;
        reslutM.status = results.status;
        reslutM.msg = results.msg;
        //                NSDictionary *dic = result.keyValues;
        //        [dic writeToFile:@"/Users/LTOVE/Desktop/da.plist" atomically:YES];
        
        
//        [BGDateResult getImageInfoWithIds:itemModel.check_report success:^(NSObject *result) {
//            BGGetImageInfoModel *imageModels = (BGGetImageInfoModel *)result;
//            
//            NSMutableArray *array = [NSMutableArray array];
//            for (BGGetImageInfoModelRes *modelss in imageModels.res) {
//                BGCheckReportModel *MyImageModel = [BGCheckReportModel new];
//                MyImageModel.url = modelss.url;
//                [array addObject:MyImageModel];
//                
//            }
//            
//            itemModel.check_reports = array;
//            results.res = itemModel;
        
        
        
            [BGDateResult getImageInfoWithIds:itemModel.check_report success:^(NSObject *result) {
                BGGetImageInfoModel *imageModels = (BGGetImageInfoModel *)result;
                
                NSMutableArray *array = [NSMutableArray array];
                for (BGGetImageInfoModelRes *modelss in imageModels.res) {
                    BGCheckReportModel *MyImageModel = [BGCheckReportModel new];
                    MyImageModel.url = modelss.url;
                    [array addObject:MyImageModel];
                    
                }
                
                itemModel.check_reports = array;
                reslutM.res = itemModel;
                if (success) {
                    success((NSObject *)reslutM.res);
                }
            } failure:^(NSError *error) {
                
                
            }];
        
        
        
//        if (success) {
//            success((NSObject *)results.res);
//        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)updateHeadPhotoWithimgsrc:(NSString *)imgsrc success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"imgsrc":imgsrc,
//                         @"province":province,
//                         @"order":order,
//                         @"thisPage":thisPage,
//                         @"pageNum":pageNum,
                         //                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"updateHeadPhoto" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGUpdataHeadPhotoModel *result = [BGUpdataHeadPhotoModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)beforeAuctionWithAuctionId:(NSString *)auctionId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"auctionId":auctionId,
                         //                         @"province":province,
                         //                         @"order":order,
                         //                         @"thisPage":thisPage,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"beforeAuction" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGBeforeAuctionModel *result = [BGBeforeAuctionModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)addAuctionLogWithAuvtionId:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
//    NSDictionary *dic =@{
//                          @"auctionId":auctionID,
//                          @"payPassword":payPassword,
//                          @"margin":magin,
//                          @"price":price,
//                         //                         @"pageNum":pageNum,
//                         //                         @"type":type,
//                         };
    BGParam *param = [BGParam getParamWithaction:@"addAuctionLog" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAddAuctionLogModel *result = [BGAddAuctionLogModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)createOrderWithParamDic:(NSDictionary *)paramDic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
//    NSDictionary *dic =@{
//                         @"auctionId":auctionID,
//                         @"payPassword":payPassword,
//                         @"margin":magin,
//                         @"price":price,
//                         //                         @"pageNum":pageNum,
//                         //                         @"type":type,
//                         };
    BGParam *param = [BGParam getParamWithaction:@"createOrder" dictionary:paramDic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGCreateOrderModel *result = [BGCreateOrderModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)sellerGoBidWithParamDic:(NSDictionary *)paramDic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    BGParam *param = [BGParam getParamWithaction:@"sellerGoBid" dictionary:paramDic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGSellerGoBidModel *result = [BGSellerGoBidModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)auctionLogListWithAuction:(NSString *)auction thisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"auctionId":auction,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
//                         @"price":price,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"auctionLogList" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAuctionLogListModel *result = [BGAuctionLogListModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)bidListWithInvitedId:(NSString *)inviteId thisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"inviteId":inviteId,
                         @"thisPage":thisPage,
                         @"pageNum":pageNum,
                         //                         @"price":price,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"bidList" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGAuctionLogListModel *result = [BGAuctionLogListModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)loadImagesWithUrl:(NSString *)url success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
//                         @"inviteId":inviteId,
//                         @"thisPage":thisPage,
//                         @"pageNum":pageNum,
                         //                         @"price":price,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         };
    BGParam *param = [BGParam getParamWithaction:@"bidList" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
//        BGAuctionLogListModel *result = [BGAuctionLogListModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(responseObject);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+ (void)addSadWithParamDic:(NSDictionary *)dic success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    BGParam *param = [BGParam getParamWithaction:@"addSad" dictionary:dic];
    GWLog(@"%@",param.keyValues);
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        
        BGHomeAddSadModel *result = [BGHomeAddSadModel objectWithKeyValues:responseObject];
        //        NSDictionary *dic = result.res.keyValues;
        if (success) {
            success(result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}


+(void)SadListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum type:(NSString *)type success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure

{
    NSDictionary *dic =@{
                          @"thisPage":thisPage,
                          @"pageNum":pageNum,
                          @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"sadList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnSadListResultModel *result = [BGOwnSadListResultModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)returnMarginSellerWithGoosId:(NSString *)goodsId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"goodsId":goodsId,
//                         @"pageNum":pageNum,
//                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"returnMargins" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGSellerReturnMaginModel *result = [BGSellerReturnMaginModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)returnMarginBuyerWithGoosId:(NSString *)goodsId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"inviteId":goodsId,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"returnMarginb" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGSellerReturnMaginModel *result = [BGSellerReturnMaginModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];

}

+ (void)ownInviteDelWithInviteId:(NSString *)inviteId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"inviteId":inviteId,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownInviteDel" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGOwnInviteDelModel *result = [BGOwnInviteDelModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)ownInviteDetailsWithInviteId:(NSString *)inviteId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"inviteId":inviteId,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"ownInviteDetails" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGBasicresModel *model = [BGBasicresModel objectWithKeyValues:responseObject];
        
        BGGoodInfoDataResult *result = [BGGoodInfoDataResult new];
        result.status = model.status;
        result.msg = model.msg;
        BGGoodInfoResult *res = [BGGoodInfoResult objectWithKeyValues:model.res];
        result.res = res;
        
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)noticeListWithType:(NSString *)type thisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                          @"type":type,
                          @"pageNum":pageNum,
                          @"thisPage":thisPage,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"noticeList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGNoticeListModel *result = [BGNoticeListModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)imagesListWithType:(NSString *)type thisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"type":type,
                         @"pageNum":pageNum,
                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"imagesList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGImagesListModel *result = [BGImagesListModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)readAddGoodsStepTwoWith:(NSString *)objectId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"objectId":objectId,
//                         @"pageNum":pageNum,
//                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"readAddGoodsStepTwo" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGReadAddGoodsStepTWoModel *result = [BGReadAddGoodsStepTWoModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}

+ (void)readAddGoodsStepThreeWith:(NSString *)objectId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"objectId":objectId,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"readAddGoodsStepThree" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGReadAddGoodsStepThreeModel *result = [BGReadAddGoodsStepThreeModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];

}
+ (void)getgetInfoByName:(NSString *)name pnone:(NSString *)phone success:(void (^)(NSObject *))success failure:(void (^)(NSObject *))failure {
    
    NSDictionary *dic = @{@"name":name,
                          @"phone":phone};
    BGParam *param = [BGParam getParamWithaction:@"getInfoByNamePhone" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:nil success:^(id responseObject) {
        if (success) {
            BGgetInfoByNamePhoneModel *result = [BGgetInfoByNamePhoneModel objectWithKeyValues:responseObject];
            success((NSObject *)result);
        }
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
    
}
+ (void)readAddGoodsStepModifyTwoWith:(NSString *)objectId success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure
{
    NSDictionary *dic =@{
                         @"objectId":objectId,
                         //                         @"pageNum":pageNum,
                         //                         @"type":type,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"readAddGoodsStepTwo" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGReadStepTwoModel *result = [BGReadStepTwoModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
}
+ (void)getArticleCate:(NSString *)module success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure {
    
    NSDictionary *dic = @{
                          @"module":module
                          };
    BGParam *param = [BGParam getParamWithaction:@"getArticleCate" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
    } success:^(id responseObject) {
        
        
        
    } failure:^(NSError *error) {
        if (failure) {
            failure(error);
        }
    }];
    
}
+ (void)brandListWithType:(NSString *)type thisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure {
    NSDictionary *dic =@{
                         @"cate":type,
                         @"pageNum":pageNum,
                         @"thisPage":thisPage,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"articleList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGNoticeListModel *result = [BGNoticeListModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];

}
+ (void)brandListWithThisPage:(NSString *)thisPage pageNum:(NSString *)pageNum success:(void (^)(NSObject *))success failure:(void (^)(NSError *))failure {
    
    NSDictionary *dic =@{
                         @"pageNum":pageNum,
                         @"thisPage":thisPage,
                         //                         @"cont":cont,
                         //                         @"remark":remark,
                         
                         };
    //    NSLog(@"%@",dic);
    BGParam *param = [BGParam getParamWithaction:@"brandList" dictionary:dic];
    [BGHttpTool POST:[BGBasicUrl getUrl] paramenters:param.keyValues progress:^(NSProgress *progress) {
        
        
    } success:^(id responseObject) {
        BGBrandZoneModel *result = [BGBrandZoneModel objectWithKeyValues:responseObject];
        
        if (success) {
            success((NSObject *)result);
        }
        
    } failure:^(NSError *error) {
        
        if (failure) {
            failure(error);
        }
    }];
    
}
@end
